package com.yunshang.shoppingmall.service.impl;

import com.yunshang.shoppingmall.entity.Share;
import com.yunshang.shoppingmall.mapper.ShareMapper;
import com.yunshang.shoppingmall.service.ShareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShareServiceImpl implements ShareService {

    @Autowired
    ShareMapper shareMapper;

    @Override
    public int insert(Share share) {
         shareMapper.insert(share);
         System.out.print("id="+share.getId().toString());
        return share.getId();
    }

    @Override
    public int updateByPrimaryKey(Share record)
    {
        return  shareMapper.updateByPrimaryKey(record);
    }

    @Override
    public  int updateByPrimaryKeySelective(Share share)
    {
        return shareMapper.updateByPrimaryKeySelective(share);
    }

    @Override
    public List<Share> selectShareAll()
    {
        return  shareMapper.selectShareAll();
    }

    @Override
    public List<Share> selectByPrimaryKey(Integer id)
    {
        return shareMapper.selectByPrimaryKey(id);
    }

}
